function genHtmlUrl(day,orderby,minArea,maxArea,mode){
	var t = $('sTradeType').value;
	var s = '/' ;
	s+= (t==1||t==2||t==3)?'rent':'sell';
	s+=  '/t' + t ;
	s+=  '/l' + $('sLayout').value ;
	s+=  '/b' + $('sBuildType').value ;
	s+=  '/u' + $('sUserType').value ;
	s+=  '/p' + (($('sMinPrice').value==0)?'':$('sMinPrice').value) + '-' + (($('sMaxPrice').value==0)?'':$('sMaxPrice').value);
	s+=  '/a' + minArea +'-' + maxArea;
	s+=  '/d' + $('sDay').value ;
	s+=  '/o' + orderby ;
	s+=  '/k' + encodeURI($('keyword').value.replace(/\s/g,'')) ;
	if(($('sArea').value!='')) s+= '/' + $('sArea').value ;
	if(($('sAddress').value!='')) s+= '/' + $('sAddress').value ;
	if(mode!=null&&mode==1){
		window.open(s+'/1.html');
	}else{
		location.href=s+'/1.html';
	}
	return false;
}
function change_area(val,obj1,value1)
{
	
	var item_name = val;
	var grr = obj1;
	for (i=grr.length;i>0;i--)
	{
		grr.options[0] = null;
	}
	
    if (item_name == "3502030000")//思明
    {
        obj1.options.add(new Option("所在路段", ""));
        obj1.options.add(new Option("B 槟榔东里", "3502030001"));
        obj1.options.add(new Option("B 槟榔西里", "3502030002"));
        obj1.options.add(new Option("B 白鹭洲路", "3502030003"));
        obj1.options.add(new Option("B 白城", "3502030004"));
        obj1.options.add(new Option("B 博物馆", "3502030005"));
        obj1.options.add(new Option("C 长青路", "3502030006"));
        obj1.options.add(new Option("D 斗西路", "3502030007"));
        obj1.options.add(new Option("D 大学路", "3502030008"));
        obj1.options.add(new Option("D 大同路", "3502030009"));
        obj1.options.add(new Option("D 电子城", "3502030010"));

        obj1.options.add(new Option("D 东浦路", "3502030011"));
        obj1.options.add(new Option("D 大生里", "3502030012"));
        obj1.options.add(new Option("F 福津大街", "3502030013"));
        obj1.options.add(new Option("F 凤屿路", "3502030014"));
        obj1.options.add(new Option("G 故宫路", "3502030015"));
        obj1.options.add(new Option("G 鼓浪屿", "3502030016"));
        obj1.options.add(new Option("G 公园附近", "3502030017"));
        obj1.options.add(new Option("H 后埭溪路", "3502030018"));
        obj1.options.add(new Option("H 环岛路", "3502030019"));
        obj1.options.add(new Option("H 后滨路", "3502030020"));

        obj1.options.add(new Option("H 虎园路", "3502030021"));
        obj1.options.add(new Option("H 会展路", "3502030022"));
        obj1.options.add(new Option("H 后溪路", "3502030023"));
        obj1.options.add(new Option("H 黄厝", "3502030024"));
        obj1.options.add(new Option("H 禾祥西路", "3502030025"));
        obj1.options.add(new Option("H 禾祥东路", "3502030026"));
        obj1.options.add(new Option("H 湖滨南路", "3502030027"));
        obj1.options.add(new Option("H 湖滨北路", "3502030028"));
        obj1.options.add(new Option("H 湖滨东路", "3502030029"));
        obj1.options.add(new Option("H 火车站附近", "3502030030"));

        obj1.options.add(new Option("H 湖滨西路", "3502030031"));
        obj1.options.add(new Option("H 湖滨中路", "3502030082")); //2009-2-19 新增 																										
        obj1.options.add(new Option("H 湖明路", "3502030081")); //2008-2-18 新增 																										
        obj1.options.add(new Option("J 建业路", "3502030032"));
        obj1.options.add(new Option("J 金鸡亭", "3502030033"));
        //obj1.options.add(new Option("东浦路","东浦路"));																										
        obj1.options.add(new Option("J 建兴路", "3502030034"));
        obj1.options.add(new Option("J 将军祠", "3502030035"));
        obj1.options.add(new Option("J 金榜路", "3502030036"));
        obj1.options.add(new Option("J 嘉禾路", "3502030037"));
        obj1.options.add(new Option("J 金桥路", "3502030038"));
        obj1.options.add(new Option("L 莲坂", "3502030039"));
        obj1.options.add(new Option("L 莲前", "3502030040"));

        obj1.options.add(new Option("L 莲岳路", "3502030041"));
        obj1.options.add(new Option("L 莲花一村", "3502030042"));
        obj1.options.add(new Option("L 莲花二村", "3502030043"));
        obj1.options.add(new Option("L 莲花三村", "3502030044"));
        obj1.options.add(new Option("L 莲花五村", "3502030045"));
        obj1.options.add(new Option("L 莲花北路", "3502030046"));
        obj1.options.add(new Option("L 鹭江道", "3502030047"));
        obj1.options.add(new Option("M 美湖路", "3502030048"));
        obj1.options.add(new Option("M 民族路", "3502030049"));
        obj1.options.add(new Option("Q 七星路", "3502030050"));

        obj1.options.add(new Option("Q 前埔南区", "3502030051"));
        obj1.options.add(new Option("Q 前埔北区", "3502030052"));
        obj1.options.add(new Option("S 思明南路", "3502030053"));
        obj1.options.add(new Option("S 思明北路", "3502030054"));
        obj1.options.add(new Option("S 思明东路", "3502030055"));
        obj1.options.add(new Option("S 思明西路", "3502030056"));
        obj1.options.add(new Option("S 市政府大道", "3502030057"));
        obj1.options.add(new Option("S 双涵路", "3502030058"));
        obj1.options.add(new Option("S 松柏", "3502030059"));
        obj1.options.add(new Option("T 体育路", "3502030060"));

        obj1.options.add(new Option("T 同安路", "3502030061"));
        //obj1.options.add(new Option("莲花","莲花"));																										
        obj1.options.add(new Option("T 体育路", "3502030062"));
        obj1.options.add(new Option("W 文园路", "3502030063"));
        obj1.options.add(new Option("W 文兴东路", "3502030064"));
        obj1.options.add(new Option("W 文园路", "3502030065"));
        obj1.options.add(new Option("W 文灶", "3502030066"));
        obj1.options.add(new Option("W 文屏路", "3502030067"));
        obj1.options.add(new Option("X 厦大", "3502030068"));
        obj1.options.add(new Option("X 厦禾路", "3502030069"));
        obj1.options.add(new Option("X 仙岳路", "3502030070"));

        obj1.options.add(new Option("X 新华路", "3502030071"));
        obj1.options.add(new Option("Y 岳阳小区", "3502030072"));
        obj1.options.add(new Option("Y 育秀路", "3502030073"));
        obj1.options.add(new Option("Y 筼筜路", "3502030074"));
        obj1.options.add(new Option("Y 演武路", "3502030075"));
        obj1.options.add(new Option("Z 镇海路", "3502030076"));
        obj1.options.add(new Option("Z 中山路", "3502030077"));
        obj1.options.add(new Option("Z 曾厝垵", "3502030078"));
        obj1.options.add(new Option("Z 曾厝", "3502030079"));
        obj1.options.add(new Option("Z 珍珠湾", "3502030080"));
        setSelectedValue(obj1, value1);
    }

    if (item_name == "3502060000")//湖里
    {
        obj1.options.add(new Option("所在路段", ""));
        obj1.options.add(new Option("B 保税区", "3502060001"));
        obj1.options.add(new Option("C 蔡塘后坑", "3502060002"));
        obj1.options.add(new Option("C 长岸路", "3502060003"));
        obj1.options.add(new Option("D 东渡", "3502060005"));
        obj1.options.add(new Option("D 大唐世家", "3502060006"));
        obj1.options.add(new Option("D 殿前", "3502060042"));
        obj1.options.add(new Option("F 芙蓉苑", "3502060007"));
        obj1.options.add(new Option("F 枋湖", "3502060008"));
        obj1.options.add(new Option("F 枋钟路", "3502060009"));
        obj1.options.add(new Option("H 湖里大道", "3502060010"));

        obj1.options.add(new Option("H 华荣路", "3502060011"));
        obj1.options.add(new Option("H 火炬路", "3502060012"));
        obj1.options.add(new Option("H 华嘉路", "3502060013"));
        obj1.options.add(new Option("H 华盛路", "3502060014"));
        obj1.options.add(new Option("H 鸿宾路", "3502060015"));
        obj1.options.add(new Option("H 濠头", "3502060016"));
        obj1.options.add(new Option("H 华昌路", "3502060017"));
        obj1.options.add(new Option("H 海天路", "3502060018"));
        obj1.options.add(new Option("J 金湖路", "3502060019"));
        obj1.options.add(new Option("J 江头", "3502060020"));

        obj1.options.add(new Option("J 金尚路", "3502060021"));
        obj1.options.add(new Option("J 机场附近", "3502060022"));
        obj1.options.add(new Option("J 江头北路", "3502060023"));
        obj1.options.add(new Option("J 嘉园路", "3502060042"));
        obj1.options.add(new Option("K 康乐", "3502060024"));
        obj1.options.add(new Option("L 吕岭路", "3502060025"));
        obj1.options.add(new Option("M 马垄", "3502060026"));
        obj1.options.add(new Option("N 南山路", "3502060027"));
        obj1.options.add(new Option("Q 区政府", "3502060028"));
        obj1.options.add(new Option("S 疏港路", "3502060029"));
        obj1.options.add(new Option("T 台湾街", "3502060030"));

        obj1.options.add(new Option("W 乌石埔", "3502060031"));
        obj1.options.add(new Option("W 万景花园", "3502060032"));
        obj1.options.add(new Option("X 兴湖路", "3502060033"));
        obj1.options.add(new Option("X 兴隆路", "3502060034"));
        obj1.options.add(new Option("X 仙洞路", "3502060035"));
        obj1.options.add(new Option("X 象屿", "3502060036"));
        obj1.options.add(new Option("Y 永升新城", "3502060037"));
        obj1.options.add(new Option("Y 园山南路", "3502060038"));
        obj1.options.add(new Option("Y 悦华路", "3502060039"));
        obj1.options.add(new Option("Y 宜宾路", "3502060040"));
        obj1.options.add(new Option("Z 寨上", "3502060041"));

        setSelectedValue(obj1, value1);
    }

    if (item_name == "3502050000")//海沧
    {
        obj1.options.add(new Option("所在路段", ""));
        obj1.options.add(new Option("C 沧虹路", "3502050001"));
        obj1.options.add(new Option("C 滨湖路", "3502050002"));
        obj1.options.add(new Option("C 沧林路", "3502050003"));
        obj1.options.add(new Option("G 嵩屿码头", "3502050004"));
        obj1.options.add(new Option("G 嵩屿北里", "3502050012"));
        obj1.options.add(new Option("H 海沧", "3502050005"));
        obj1.options.add(new Option("H 海富路", "3502050006"));
        obj1.options.add(new Option("H 海浴路", "3502050007"));
        obj1.options.add(new Option("H 海沧生活区", "3502050008"));
        obj1.options.add(new Option("M 马青路", "3502050013"));
        obj1.options.add(new Option("X 西部工业区", "3502050009"));
        obj1.options.add(new Option("X 新阳工业区", "3502050010"));
        obj1.options.add(new Option("Z 钟林路", "3502050011"));
        setSelectedValue(obj1, value1);
    }
    if (item_name == "3502110000")//集美
    {
        obj1.options.add(new Option("所在路段", ""));
        obj1.options.add(new Option("B 鳌园路", "3502110001"));
        obj1.options.add(new Option("J 集美", "3502110002"));
        obj1.options.add(new Option("J 嘉庚路", "3502110003"));
        obj1.options.add(new Option("J 集源路", "3502110004"));
        obj1.options.add(new Option("J 集海路", "3502110005"));
        obj1.options.add(new Option("J 集岺路", "3502110006"));
        obj1.options.add(new Option("S 孙坂路", "3502110007"));
        obj1.options.add(new Option("S 石鼓路", "3502110008"));
        obj1.options.add(new Option("T 同集南路", "3502110009"));
        obj1.options.add(new Option("X 浔江路", "3502110010"));

        obj1.options.add(new Option("Y 银江路", "3502110011"));
        obj1.options.add(new Option("Y 银亭路", "3502110012"));
        obj1.options.add(new Option("Y 印斗路", "3502110013"));
        obj1.options.add(new Option("Z 中心花园", "3502110014"));

        setSelectedValue(obj1, value1);
    }

    if (item_name == "3502120000")//同安
    {
        obj1.options.add(new Option("所在路段", "3502129999"));
        obj1.options.add(new Option("C 城南路", "3502120001"));
        obj1.options.add(new Option("C 城西路", "3502120012"));
        obj1.options.add(new Option("E 二环路", "3502120002"));
        obj1.options.add(new Option("H 环城路", "3502120003"));
        obj1.options.add(new Option("L 榕源路", "3502120004"));
        obj1.options.add(new Option("M 梅山路", "3502120005"));
        obj1.options.add(new Option("S 上田路", "3502120006"));
        obj1.options.add(new Option("S 思振路", "3502120007"));
        obj1.options.add(new Option("T 同安", "3502120008"));
        obj1.options.add(new Option("T 同集路", "3502120009"));
        obj1.options.add(new Option("Y 阳翟路", "3502120010"));
        obj1.options.add(new Option("Y 银湖路", "3502120011"));
        setSelectedValue(obj1, value1);
    }
    if (item_name == "3502130000")//翔安
    {
        obj1.options.add(new Option("所在路段", ""));
        obj1.options.add(new Option("M 马巷", "3502130001"));
        obj1.options.add(new Option("N 内厝", "3502130002"));
        obj1.options.add(new Option("X 新店", "3502130003"));
        obj1.options.add(new Option("X 新圩", "3502130004"));
        setSelectedValue(obj1, value1);
    }
    if (item_name == "3506000000")//漳州
    {
        obj1.options.add(new Option("所在路段", ""));
        obj1.options.add(new Option("X 芗城区", "3506020000"));
        obj1.options.add(new Option("L 龙文区", "3506030000"));
        obj1.options.add(new Option("L 龙海市", "3506810000"));
        obj1.options.add(new Option("L 龙池开发区", "3506000001"));
        obj1.options.add(new Option("Z 漳浦县", "3506230000"));
        obj1.options.add(new Option("S 诏安县", "3506240000"));
        obj1.options.add(new Option("C 长泰县", "3506250000"));
        obj1.options.add(new Option("D 东山县", "3506260000"));
        obj1.options.add(new Option("Y 云霄县", "3506220000"));
        obj1.options.add(new Option("N 南靖县", "3506270000"));
        obj1.options.add(new Option("P 平和县", "3506280000"));
        obj1.options.add(new Option("H 华安县", "3506290000"));
        setSelectedValue(obj1, value1);
    }
    if (item_name == "3505000000")//泉州
    {
        obj1.options.add(new Option("所在路段", ""));
        obj1.options.add(new Option("L 清濛区", "3505010000"));
        obj1.options.add(new Option("L 鲤城区", "3505020000"));
        obj1.options.add(new Option("F 丰泽区", "3505030000"));
        obj1.options.add(new Option("L 洛江区", "3505040000"));
        obj1.options.add(new Option("Q 泉港区", "3505050000"));
        obj1.options.add(new Option("J 晋江市", "3505820000"));
        obj1.options.add(new Option("S 石狮市", "3505810000"));
        obj1.options.add(new Option("N 南安市", "3505830000"));
        obj1.options.add(new Option("H 惠安县", "3505210000"));
        obj1.options.add(new Option("A 安溪县", "3505240000"));
        obj1.options.add(new Option("Y 永春县", "3505250000"));
        obj1.options.add(new Option("D 德化县", "3505260000"));
        obj1.options.add(new Option("Q 泉州经济技术开发区", "3505000001"));
        setSelectedValue(obj1, value1);
    }
    if (item_name == "3508000000")//龙岩
    {
        obj1.options.add(new Option("所在路段", ""));
        obj1.options.add(new Option("X 新罗区", "3508020000"));
        obj1.options.add(new Option("Z 漳平市", "3508810000"));
        obj1.options.add(new Option("Y 永定县", "3508220000"));
        obj1.options.add(new Option("S 上杭县", "3508230000"));
        obj1.options.add(new Option("W 武平县", "3508240000"));
        obj1.options.add(new Option("L 连城县", "3508250000"));
        obj1.options.add(new Option("C 长汀县", "3508210000"));
        obj1.options.add(new Option("L 龙岩开发区", "35080000001"));
        obj1.options.add(new Option("Z 漳平工业园区", "3508000002"));
        setSelectedValue(obj1, value1);
    }
    if (item_name == "3501000000")//福州市
    {
        obj1.options.add(new Option("所在路段", ""));
        obj1.options.add(new Option("G 鼓楼区", "3501020000"));
        obj1.options.add(new Option("T 台江区", "3501030000"));
        obj1.options.add(new Option("J 晋安区", "3501110000"));
        obj1.options.add(new Option("C 仓山区", "3501040000"));
        obj1.options.add(new Option("M 马尾区", "3501050000"));
        obj1.options.add(new Option("F 福清市", "3501810000"));
        obj1.options.add(new Option("C 长乐市", "3501820000"));
        obj1.options.add(new Option("M 闽候县", "3501210000"));
        obj1.options.add(new Option("L 连江县", "3501220000"));
        obj1.options.add(new Option("P 平潭县", "3501280000"));
        obj1.options.add(new Option("Y 永泰县", "3501250000"));
        obj1.options.add(new Option("M 闽清县", "3501240000"));
        obj1.options.add(new Option("L 罗源县", "3501230000"));
        setSelectedValue(obj1, value1);
    }
    if (item_name == "3503000000")//莆田市
    {
        obj1.options.add(new Option("所在路段", ""));
        obj1.options.add(new Option("L 荔城区", "3503040000"));
        obj1.options.add(new Option("C 城厢区", "3503020000"));
        obj1.options.add(new Option("H 涵江区", "3503030000"));
        obj1.options.add(new Option("X 秀屿区", "3503050000"));
        obj1.options.add(new Option("X 仙游县", "3503220000"));
        setSelectedValue(obj1, value1);
    }
    if (item_name == "3509000000")//宁德市
    {
        obj1.options.add(new Option("所在路段", ""));
        obj1.options.add(new Option("J 蕉城区", "3509020000"));
        obj1.options.add(new Option("F 福安市", "3509810000"));
        obj1.options.add(new Option("F 福鼎市", "3509820000"));
        obj1.options.add(new Option("X 霞浦县", "3509210000"));
        obj1.options.add(new Option("G 古田县", "3509220000"));
        obj1.options.add(new Option("P 屏南县", "3509230000"));
        obj1.options.add(new Option("X 寿宁县", "3509240000"));
        obj1.options.add(new Option("Z 周宁县", "3509250000"));
        obj1.options.add(new Option("Z 拓荣县", "3509260000"));
        setSelectedValue(obj1, value1);
    }
    if (item_name == "3507000000")//南平市
    {
        obj1.options.add(new Option("所在路段", ""));
        obj1.options.add(new Option("Y 延平区", "3507020000"));
        obj1.options.add(new Option("S 邵武市", "3507810000"));
        obj1.options.add(new Option("W 武夷山市", "3507820000"));
        obj1.options.add(new Option("J 建瓯市", "3507830000"));
        obj1.options.add(new Option("J 建阳市", "3507840000"));
        obj1.options.add(new Option("S 顺昌县", "3507210000"));
        obj1.options.add(new Option("P 浦城县", "3507220000"));
        obj1.options.add(new Option("G 光泽县", "3507230000"));
        obj1.options.add(new Option("S 松溪县", "3507240000"));
        obj1.options.add(new Option("Z 政和县", "3507250000"));
        setSelectedValue(obj1, value1);
    }
    if (item_name == "3504000000")//三明市
    {
        obj1.options.add(new Option("所在路段", ""));
        obj1.options.add(new Option("S 三元区", "3504030000"));
        obj1.options.add(new Option("M 梅列区", "3504020000"));
        obj1.options.add(new Option("Y 永安市", "3504810000"));
        obj1.options.add(new Option("Q 清流县", "3504230000"));
        obj1.options.add(new Option("N 宁化县", "3504240000"));
        obj1.options.add(new Option("D 大田县", "3504250000"));
        obj1.options.add(new Option("S 沙县", "3504270000"));
        obj1.options.add(new Option("Y 尤溪县", "3504260000"));
        obj1.options.add(new Option("J 将乐县", "3504280000"));
        obj1.options.add(new Option("T 泰宁县", "3504290000"));
        obj1.options.add(new Option("J 建宁县", "3504300000"));
        obj1.options.add(new Option("M 明溪县", "3504210000"));


        setSelectedValue(obj1, value1);
    }

	if (item_name=="")
	{
		obj1.options.add(new Option("所有路段",""));
		setSelectedValue(obj1,value1);	
	}
	
}
function setSelectedValue(selectName,value)
{
    var len1=selectName.options.length;
	for(var i=0;i<len1;i++)
	{
		var opvalue = selectName.options[i].value;
		if(opvalue == value)
		{
			selectName.options[i].selected = true;
			break;
		}
	}
}
var s1,s2,s3,s4;//view

function loadmark(id){//房源备注
	var html = PG.getCookie('mark_'+id);
	if(html==null||html==''||html==',') return;
	Element.update('fremark','<b class="c_redd00">'+decodeURI(html)+'</b>');
	
}
function setmark(id,cbname,inputname){
	var val = encodeURI(PG.getCheckBoxValue(cbname));
	val+=','+encodeURI($(inputname).value);
	PG.setCookie('mark_'+id,val,7,'/');
	alert('您已对此房源备注（此备注保存7天!）')
	loadmark(id)
}
loadmark('<xsl:value-of select="rows/row/T_HouseInfos_ID"/>');
			

function openUserSurvey(){//房源备注
	var w = new _window_({draggable:true,isModal:true,width:450,buttons:{enabled:true,OK:true}});
	w.loadContent('用户调查','UserSurvey','cid=1');
	w.close = function(){
	$('AdLayer').show();
	if(this.isModal) Element.hide(this.modal)
	Element.hide(this.divContainer)
	this.remove();
}
	w.OnOK=function(){
	if($('votetext').value.length<=3){
	window.alert("请输入内容至少三个字以上!");	
	$('votetext').focus();	
	return ;	
}
	else {
	var query='item1='+s1.getValue()+'&item2='+s2.getValue()+'&item3='+s3.getValue()+'&item4='+s4.getValue()+'&votetext='+$('votetext').value+'&email='+$('email').value+'&mobile='+$('mobile').value;	
}
	if(PG.doCmd('userdiaocha',query,false)==1){
	alert('感谢您的参与');
}
	this.close();
	$('AdLayer').show();
}
}
	Event.observe(window,'scroll',function(){

	var scrollvalue = Position.realOffset(document.documentElement);
	Element.setStyle('AdLayer',{
	top: (300+scrollvalue.top) + 'px'
});
}
);
